/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ge.info;
import javax.servlet.ServletContext;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;


public class SpringContextFactory {
    private ServletContext servletContext;
    private WebApplicationContext appContext;

    public WebApplicationContext getAppContext() {
        return appContext;
    }

    public ServletContext getServletContext() {
        return servletContext;
    }

    public void setServletContext(ServletContext servletContext) {
        this.servletContext = servletContext;
        appContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
    }
}
